// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file iridiumsbd_status.h
 * This header file contains the declaration of the described types in the IDL file.
 *
 * This file was generated by the tool gen.
 */

#ifndef _IRIDIUMSBD_STATUS_H_
#define _IRIDIUMSBD_STATUS_H_

// TODO Poner en el contexto.

#include <stdint.h>
#include <array>
#include <string>
#include <vector>
#include <map>
#include <bitset>

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec( dllexport )
#else
#define eProsima_user_DllExport
#endif
#else
#define eProsima_user_DllExport
#endif

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#if defined(iridiumsbd_status_SOURCE)
#define iridiumsbd_status_DllAPI __declspec( dllexport )
#else
#define iridiumsbd_status_DllAPI __declspec( dllimport )
#endif // iridiumsbd_status_SOURCE
#else
#define iridiumsbd_status_DllAPI
#endif
#else
#define iridiumsbd_status_DllAPI
#endif // _WIN32

namespace eprosima
{
    namespace fastcdr
    {
        class Cdr;
    }
}


/*!
 * @brief This class represents the structure iridiumsbd_status defined by the user in the IDL file.
 * @ingroup IRIDIUMSBD_STATUS
 */
class iridiumsbd_status
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport iridiumsbd_status();

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~iridiumsbd_status();

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object iridiumsbd_status that will be copied.
     */
    eProsima_user_DllExport iridiumsbd_status(const iridiumsbd_status &x);

    /*!
     * @brief Move constructor.
     * @param x Reference to the object iridiumsbd_status that will be copied.
     */
    eProsima_user_DllExport iridiumsbd_status(iridiumsbd_status &&x);

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object iridiumsbd_status that will be copied.
     */
    eProsima_user_DllExport iridiumsbd_status& operator=(const iridiumsbd_status &x);

    /*!
     * @brief Move assignment.
     * @param x Reference to the object iridiumsbd_status that will be copied.
     */
    eProsima_user_DllExport iridiumsbd_status& operator=(iridiumsbd_status &&x);

    /*!
     * @brief This function sets a value in member timestamp_
     * @param _timestamp_ New value for member timestamp_
     */
    eProsima_user_DllExport void timestamp_(uint64_t _timestamp_);

    /*!
     * @brief This function returns the value of member timestamp_
     * @return Value of member timestamp_
     */
    eProsima_user_DllExport uint64_t timestamp_() const;

    /*!
     * @brief This function returns a reference to member timestamp_
     * @return Reference to member timestamp_
     */
    eProsima_user_DllExport uint64_t& timestamp_();

    /*!
     * @brief This function sets a value in member last_heartbeat_
     * @param _last_heartbeat_ New value for member last_heartbeat_
     */
    eProsima_user_DllExport void last_heartbeat_(uint64_t _last_heartbeat_);

    /*!
     * @brief This function returns the value of member last_heartbeat_
     * @return Value of member last_heartbeat_
     */
    eProsima_user_DllExport uint64_t last_heartbeat_() const;

    /*!
     * @brief This function returns a reference to member last_heartbeat_
     * @return Reference to member last_heartbeat_
     */
    eProsima_user_DllExport uint64_t& last_heartbeat_();

    /*!
     * @brief This function sets a value in member tx_buf_write_index_
     * @param _tx_buf_write_index_ New value for member tx_buf_write_index_
     */
    eProsima_user_DllExport void tx_buf_write_index_(uint16_t _tx_buf_write_index_);

    /*!
     * @brief This function returns the value of member tx_buf_write_index_
     * @return Value of member tx_buf_write_index_
     */
    eProsima_user_DllExport uint16_t tx_buf_write_index_() const;

    /*!
     * @brief This function returns a reference to member tx_buf_write_index_
     * @return Reference to member tx_buf_write_index_
     */
    eProsima_user_DllExport uint16_t& tx_buf_write_index_();

    /*!
     * @brief This function sets a value in member rx_buf_read_index_
     * @param _rx_buf_read_index_ New value for member rx_buf_read_index_
     */
    eProsima_user_DllExport void rx_buf_read_index_(uint16_t _rx_buf_read_index_);

    /*!
     * @brief This function returns the value of member rx_buf_read_index_
     * @return Value of member rx_buf_read_index_
     */
    eProsima_user_DllExport uint16_t rx_buf_read_index_() const;

    /*!
     * @brief This function returns a reference to member rx_buf_read_index_
     * @return Reference to member rx_buf_read_index_
     */
    eProsima_user_DllExport uint16_t& rx_buf_read_index_();

    /*!
     * @brief This function sets a value in member rx_buf_end_index_
     * @param _rx_buf_end_index_ New value for member rx_buf_end_index_
     */
    eProsima_user_DllExport void rx_buf_end_index_(uint16_t _rx_buf_end_index_);

    /*!
     * @brief This function returns the value of member rx_buf_end_index_
     * @return Value of member rx_buf_end_index_
     */
    eProsima_user_DllExport uint16_t rx_buf_end_index_() const;

    /*!
     * @brief This function returns a reference to member rx_buf_end_index_
     * @return Reference to member rx_buf_end_index_
     */
    eProsima_user_DllExport uint16_t& rx_buf_end_index_();

    /*!
     * @brief This function sets a value in member failed_sbd_sessions_
     * @param _failed_sbd_sessions_ New value for member failed_sbd_sessions_
     */
    eProsima_user_DllExport void failed_sbd_sessions_(uint16_t _failed_sbd_sessions_);

    /*!
     * @brief This function returns the value of member failed_sbd_sessions_
     * @return Value of member failed_sbd_sessions_
     */
    eProsima_user_DllExport uint16_t failed_sbd_sessions_() const;

    /*!
     * @brief This function returns a reference to member failed_sbd_sessions_
     * @return Reference to member failed_sbd_sessions_
     */
    eProsima_user_DllExport uint16_t& failed_sbd_sessions_();

    /*!
     * @brief This function sets a value in member successful_sbd_sessions_
     * @param _successful_sbd_sessions_ New value for member successful_sbd_sessions_
     */
    eProsima_user_DllExport void successful_sbd_sessions_(uint16_t _successful_sbd_sessions_);

    /*!
     * @brief This function returns the value of member successful_sbd_sessions_
     * @return Value of member successful_sbd_sessions_
     */
    eProsima_user_DllExport uint16_t successful_sbd_sessions_() const;

    /*!
     * @brief This function returns a reference to member successful_sbd_sessions_
     * @return Reference to member successful_sbd_sessions_
     */
    eProsima_user_DllExport uint16_t& successful_sbd_sessions_();

    /*!
     * @brief This function sets a value in member num_tx_buf_reset_
     * @param _num_tx_buf_reset_ New value for member num_tx_buf_reset_
     */
    eProsima_user_DllExport void num_tx_buf_reset_(uint16_t _num_tx_buf_reset_);

    /*!
     * @brief This function returns the value of member num_tx_buf_reset_
     * @return Value of member num_tx_buf_reset_
     */
    eProsima_user_DllExport uint16_t num_tx_buf_reset_() const;

    /*!
     * @brief This function returns a reference to member num_tx_buf_reset_
     * @return Reference to member num_tx_buf_reset_
     */
    eProsima_user_DllExport uint16_t& num_tx_buf_reset_();

    /*!
     * @brief This function sets a value in member signal_quality_
     * @param _signal_quality_ New value for member signal_quality_
     */
    eProsima_user_DllExport void signal_quality_(uint8_t _signal_quality_);

    /*!
     * @brief This function returns the value of member signal_quality_
     * @return Value of member signal_quality_
     */
    eProsima_user_DllExport uint8_t signal_quality_() const;

    /*!
     * @brief This function returns a reference to member signal_quality_
     * @return Reference to member signal_quality_
     */
    eProsima_user_DllExport uint8_t& signal_quality_();

    /*!
     * @brief This function sets a value in member state_
     * @param _state_ New value for member state_
     */
    eProsima_user_DllExport void state_(uint8_t _state_);

    /*!
     * @brief This function returns the value of member state_
     * @return Value of member state_
     */
    eProsima_user_DllExport uint8_t state_() const;

    /*!
     * @brief This function returns a reference to member state_
     * @return Reference to member state_
     */
    eProsima_user_DllExport uint8_t& state_();

    /*!
     * @brief This function sets a value in member ring_pending_
     * @param _ring_pending_ New value for member ring_pending_
     */
    eProsima_user_DllExport void ring_pending_(bool _ring_pending_);

    /*!
     * @brief This function returns the value of member ring_pending_
     * @return Value of member ring_pending_
     */
    eProsima_user_DllExport bool ring_pending_() const;

    /*!
     * @brief This function returns a reference to member ring_pending_
     * @return Reference to member ring_pending_
     */
    eProsima_user_DllExport bool& ring_pending_();

    /*!
     * @brief This function sets a value in member tx_buf_write_pending_
     * @param _tx_buf_write_pending_ New value for member tx_buf_write_pending_
     */
    eProsima_user_DllExport void tx_buf_write_pending_(bool _tx_buf_write_pending_);

    /*!
     * @brief This function returns the value of member tx_buf_write_pending_
     * @return Value of member tx_buf_write_pending_
     */
    eProsima_user_DllExport bool tx_buf_write_pending_() const;

    /*!
     * @brief This function returns a reference to member tx_buf_write_pending_
     * @return Reference to member tx_buf_write_pending_
     */
    eProsima_user_DllExport bool& tx_buf_write_pending_();

    /*!
     * @brief This function sets a value in member tx_session_pending_
     * @param _tx_session_pending_ New value for member tx_session_pending_
     */
    eProsima_user_DllExport void tx_session_pending_(bool _tx_session_pending_);

    /*!
     * @brief This function returns the value of member tx_session_pending_
     * @return Value of member tx_session_pending_
     */
    eProsima_user_DllExport bool tx_session_pending_() const;

    /*!
     * @brief This function returns a reference to member tx_session_pending_
     * @return Reference to member tx_session_pending_
     */
    eProsima_user_DllExport bool& tx_session_pending_();

    /*!
     * @brief This function sets a value in member rx_read_pending_
     * @param _rx_read_pending_ New value for member rx_read_pending_
     */
    eProsima_user_DllExport void rx_read_pending_(bool _rx_read_pending_);

    /*!
     * @brief This function returns the value of member rx_read_pending_
     * @return Value of member rx_read_pending_
     */
    eProsima_user_DllExport bool rx_read_pending_() const;

    /*!
     * @brief This function returns a reference to member rx_read_pending_
     * @return Reference to member rx_read_pending_
     */
    eProsima_user_DllExport bool& rx_read_pending_();

    /*!
     * @brief This function sets a value in member rx_session_pending_
     * @param _rx_session_pending_ New value for member rx_session_pending_
     */
    eProsima_user_DllExport void rx_session_pending_(bool _rx_session_pending_);

    /*!
     * @brief This function returns the value of member rx_session_pending_
     * @return Value of member rx_session_pending_
     */
    eProsima_user_DllExport bool rx_session_pending_() const;

    /*!
     * @brief This function returns a reference to member rx_session_pending_
     * @return Reference to member rx_session_pending_
     */
    eProsima_user_DllExport bool& rx_session_pending_();


    /*!
     * @brief This function returns the maximum serialized size of an object
     * depending on the buffer alignment.
     * @param current_alignment Buffer alignment.
     * @return Maximum serialized size.
     */
    eProsima_user_DllExport static size_t getMaxCdrSerializedSize(size_t current_alignment = 0);

    /*!
     * @brief This function returns the serialized size of a data depending on the buffer alignment.
     * @param data Data which is calculated its serialized size.
     * @param current_alignment Buffer alignment.
     * @return Serialized size.
     */
    eProsima_user_DllExport static size_t getCdrSerializedSize(const iridiumsbd_status& data, size_t current_alignment = 0);


    /*!
     * @brief This function serializes an object using CDR serialization.
     * @param cdr CDR serialization object.
     */
    eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const;

    /*!
     * @brief This function deserializes an object using CDR serialization.
     * @param cdr CDR serialization object.
     */
    eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr);



    /*!
     * @brief This function returns the maximum serialized size of the Key of an object
     * depending on the buffer alignment.
     * @param current_alignment Buffer alignment.
     * @return Maximum serialized size.
     */
    eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0);

    /*!
     * @brief This function tells you if the Key has been defined for this type
     */
    eProsima_user_DllExport static bool isKeyDefined();

    /*!
     * @brief This function serializes the key members of an object using CDR serialization.
     * @param cdr CDR serialization object.
     */
    eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const;

private:
    uint64_t m_timestamp_;
    uint64_t m_last_heartbeat_;
    uint16_t m_tx_buf_write_index_;
    uint16_t m_rx_buf_read_index_;
    uint16_t m_rx_buf_end_index_;
    uint16_t m_failed_sbd_sessions_;
    uint16_t m_successful_sbd_sessions_;
    uint16_t m_num_tx_buf_reset_;
    uint8_t m_signal_quality_;
    uint8_t m_state_;
    bool m_ring_pending_;
    bool m_tx_buf_write_pending_;
    bool m_tx_session_pending_;
    bool m_rx_read_pending_;
    bool m_rx_session_pending_;
};

#endif // _IRIDIUMSBD_STATUS_H_